﻿using System;

namespace VXCompany.SilverlightLogging.MVVM.Models
{
    /// <summary>
    /// Specifies available results.
    /// </summary>
    public enum Result
    {
		/// <summary>
		/// No sync result available (yet).
		/// </summary>
		NoResult = 0, 
		/// <summary>
		/// Start Sync was called, but another sync is active. 
		/// </summary>
		DuplicateSync, 
		/// <summary>
		/// Sync service unavailable.
		/// </summary>
		Unavailable, 
		/// <summary>
		/// Successfully synced.
		/// </summary>
		Success, 
		/// <summary>
		/// Sync failed.
		/// </summary>
		Failure, 
		/// <summary>
		/// Sync attempt timed out
		/// </summary>
		TimeOut, 
		/// <summary>
		/// There are no errors to sync.
		/// </summary>
		NoErrorsAvailable,
		/// <summary>
		///  There are no errors with high enough ErrorLevel to sync.
		/// </summary>
		NoErrorsForCurrentLevelAvailable
    }

	public class ExceptionsSyncedEventArgs : EventArgs
	{
		/// <summary>
		/// Indicates whether sync was successfull.
		/// </summary>
        public Result Result { get; private set; }

        /// <summary>
        /// Creates new instance with the provided result.
        /// </summary>
        /// <param name="result"></param>
        public ExceptionsSyncedEventArgs(Result result)
		{
			this.Result = result;
		}
	}
}
